//
//  MainViewController.swift
//  App_Main
//
//  Created by Flutter on 2021/7/8.
//

import UIKit
import UICore
import Standard
import Monitor
import App_Common

class MainViewController: TabBarController {
    private let logger = Loggers[typeName]
}


// MARK: - Override

extension MainViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        setup()
    }
}

private extension MainViewController {
    func setup() {
        
        UITabBar.appearance().shadowImage = MainModular.image(named: "tabbar_line")
        UITabBar.appearance().backgroundImage = UIImage()
        tabBar.tintColor = UIColor.dark2
        UITabBar.appearance().backgroundColor = UIColor.light1
        
        UINavigationBar.appearance().shadowImage = MainModular.image(named: "navigation_line")
//        UINavigationBar.appearance().backgroundColor = UIColor.light1
        
        Application.add(observable: self)
        ReachabilityMonitor.add(observer: self)
        
    }

}



// MARK: - ApplicationObservable

extension MainViewController: ApplicationObservable {
    func applicationDidBecomeActive() {
        logger.trace("\(typeName) applicationDidBecomeActive")
    }
}

extension MainViewController: ReachabilityObservable {
    func reachabilityObserverConnectionWifi() {

    }
    
    func reachabilityObserverConnectionCellular() {

    }
    
    func reachabilityObserverConnectionUnavailable() {

    }
}
